#e
#Title[uNX^[h`Easyv]
#Text[p^[łB]
#ScriptVersion[2]
#PlayLevel[Normal]

script_enemy_main {
    let name ="uNX^[hv";
    let imgBoss   = "script\img\ExRumia.png";
    let frame     =  0;
    let angleBase = 90;

    @Initialize {
        CutIn(YOUMU, name, "", 0, 0, 0, 0);     

        SetX(GetCenterX);
        SetY(GetClipMinY + 120);
        SetLife(3500);
        SetTimer(47);
        SetScore(4000000);

        LoadGraphic(imgBoss);
        SetTexture(imgBoss);
        SetGraphicRect(0, 0, 63, 63);
    }

    @MainLoop {
        SetCollisionA(GetX, GetY, 24);
        SetCollisionB(GetX, GetY, 24);

          frame++;
        if(frame == 2) {           
            let angle = angleBase - 10;
            loop(10) {           
                 CreateShot01(GetX, GetY, 3, angleBase -90, WHITE23, 0);
                 CreateShot01(GetX, GetY, 3, angleBase -70, WHITE23, 0);   
                 CreateShot01(GetX, GetY, 3, angleBase -50, WHITE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase -30, WHITE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase -10, WHITE23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase +10, WHITE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +30, WHITE23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase +50, WHITE23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase +70, WHITE23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase +90, WHITE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +110, WHITE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +130, WHITE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +150, WHITE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +170, WHITE23, 0);  
                 CreateShot01(GetX, GetY, 3, angleBase +190, WHITE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +210, WHITE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +230, WHITE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +250, WHITE23, 0); 
                 CreateShot01(GetX, GetY, 3, angleBase +270, WHITE23, 0); 
                 angle += 10;
            }
            angleBase += 8;
        } else if(frame == 10) {
            let angle = angleBase - 10;
            loop(1) {         
                CreateShot01(GetX, GetY, 5, angle, BLUE03, 3);   
                                                       
                angle += 10;
            }            
            angleBase += 8;
            frame = 0;
        }
    }

    @DrawLoop {
        DrawGraphic(GetX, GetY);
    }

    @Finalize {
        DeleteGraphic(imgBoss);
    }
}